package com.four.hospital.controller;

import com.four.common.utils.R;
import com.four.hospital.entity.Level;
import com.four.hospital.service.LevelService;
import com.four.hospital.vo.LevelVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author:wsy
 * @Date: 2022/01/07/9:11
 * @Description
 */
@RestController
@RequestMapping("hospital/level")
public class LevelController {

    @Autowired
    private LevelService levelService;

    /**
     * 根据医院id 和 科室id查询等级信息
     * @param depId
     * @return
     */
    @GetMapping("/levelList/{depId}/{hosId}")
    public R levelList(@PathVariable("depId")Integer depId,@PathVariable("hosId")Integer hosId){
        List<LevelVo> levelList=levelService.levelList(depId,hosId);
        return R.ok().put("levelList",levelList);
    }
}
